package br.com.wryel.controller;

import java.io.Serializable;

import br.com.wryel.model.GenericModel;
import br.com.wryel.model.ModelFactory;

public abstract class EntityController<Entity extends Serializable, Model extends GenericModel<Entity>> extends BasicController {

	private Class<Model> modelClass;
	
	public EntityController(Class<Model> modelClass) {
		this.modelClass = modelClass;
	}
	
	protected Model getModel() {
		Model model = ModelFactory.getModelByInterface(modelClass);
		return model;
	}
}
